How queries are executed in a distributed cluster